package com.softkey;

import java.util.Date;

public class SecurityInfo {
    private int id; /* ID */
    private String user_id; /* 关联用户ID */
    private String key_id; /* 锁ID */
    private String secretKey; /* 增强密钥 */
    private String mix_key; /*混淆key*/

    private String passwd_rx; /* 读取密码 高位 */
    private String passwd_ry; /* 读取密码 低位 */
    private String passwd_wx; /* 写入密码 高位 */
    private String passwd_wy; /* 写入密码 低位 */

    private String cache_info;/* 预留在key的信息 */
    private int info_pos; /* info 存入的内存位置 */
    private int info_len; /* info 长度 */

    private Date create_date; //创建时间
    private Date update_date; //修改时间

    public SecurityInfo(){
        this.create_date=new Date();
        this.update_date=new Date();
    }

    public SecurityInfo(String user_id, String passwd_rx, String passwd_ry, String passwd_wx, String passwd_wy, String cache_info, int info_pos, int info_len, String secretKey, String key_id) {
        this.user_id = user_id;
        this.passwd_rx = passwd_rx;
        this.passwd_ry = passwd_ry;
        this.passwd_wx = passwd_wx;
        this.passwd_wy = passwd_wy;
        this.cache_info = cache_info;
        this.info_pos = info_pos;
        this.info_len = info_len;
        this.secretKey = secretKey;
        this.key_id = key_id;

        this.create_date=new Date();
        this.update_date=new Date();
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getPasswd_rx() {
        return passwd_rx;
    }

    public void setPasswd_rx(String passwd_rx) {
        this.passwd_rx = passwd_rx;
    }

    public String getPasswd_ry() {
        return passwd_ry;
    }

    public void setPasswd_ry(String passwd_ry) {
        this.passwd_ry = passwd_ry;
    }

    public String getPasswd_wx() {
        return passwd_wx;
    }

    public void setPasswd_wx(String passwd_wx) {
        this.passwd_wx = passwd_wx;
    }

    public String getPasswd_wy() {
        return passwd_wy;
    }

    public void setPasswd_wy(String passwd_wy) {
        this.passwd_wy = passwd_wy;
    }

    public String getUser_id() {
        return user_id;
    }

    public void setUser_id(String user_id) {
        this.user_id = user_id;
    }

    public String getCache_info() {
        return cache_info;
    }

    public void setCache_info(String cache_info) {
        this.cache_info = cache_info;
    }



    public int getInfo_pos() {
        return info_pos;
    }

    public void setInfo_pos(int info_pos) {
        this.info_pos = info_pos;
    }

    public int getInfo_len() {
        return info_len;
    }

    public void setInfo_len(int info_len) {
        this.info_len = info_len;
    }

    public String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    public String getMix_key() {
        return mix_key;
    }

    public void setMix_key(String mix_key) {
        this.mix_key = mix_key;
    }

    public String getKey_id() {
        return key_id;
    }

    public void setKey_id(String key_id) {
        this.key_id = key_id;
    }

    public Date getCreate_date() {
        return create_date;
    }

    public void setCreate_date(Date create_date) {
        this.create_date = create_date;
    }

    public Date getUpdate_date() {
        return update_date;
    }

    public void setUpdate_date(Date update_date) {
        this.update_date = update_date;
    }
    @Override
    public String toString() {
        return "SecurityInfo{" +
                "passwd_rx='" + passwd_rx + '\'' +
                ", passwd_ry='" + passwd_ry + '\'' +
                ", passwd_wx='" + passwd_wx + '\'' +
                ", passwd_wy='" + passwd_wy + '\'' +
                ", cache_info='" + cache_info + '\'' +
                ", info_pos=" + info_pos +
                ", info_len=" + info_len +
                ", secretKey='" + secretKey + '\'' +
                ", key_id='" + key_id + '\'' +
                '}';
    }
}
